﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace DogJson
{

    [StructLayout(LayoutKind.Explicit)]
    public struct JsonValue
    {
        [FieldOffset(0)]
        public int keyStringStart;
        [FieldOffset(4)]
        public int keyStringLength;

        [FieldOffset(8)]
        public long valueLong;

        [FieldOffset(8)]
        public double valueDouble;

        [FieldOffset(8)]
        public bool valueBool;

        [FieldOffset(8)]
        public int vStringStart;
        [FieldOffset(12)]
        public int vStringLength;

        [FieldOffset(16)]
        public int objectQueueIndex;

        [FieldOffset(20)]
        public int arrayIndex;

        [FieldOffset(24)]
        public JsonValueType type;
    }

}
